package com.ocom.xcxapi.client;

import com.ocom.common.constant.PayHandleUrl;
import com.ocom.common.request.payhandle.GetRecentOrderRecordsRequest;
import com.ocom.common.request.payhandle.GetWxGhParamRequest;
import com.ocom.common.request.payhandle.OrderDishesPayRequest;
import com.ocom.common.request.payhandle.QrCodeQueryRequest;
import com.ocom.common.request.ugcapi.order.RecentAddressRequest;
import com.ocom.common.resp.RespMachMessage;
import com.ocom.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value = "payhandle")
public interface PayHandleClientService {

    @PostMapping(value = PayHandleUrl.URL_getPersonByPhone)
    public RespMachMessage getPersonByPhone(@RequestParam("comId")Long comId, @RequestParam("phone")String phone);

    @PostMapping(PayHandleUrl.URL_getRecentOrderRecords)
    public Result getRecentOrderRecords(@RequestBody GetRecentOrderRecordsRequest request);

    @PostMapping(PayHandleUrl.URL_getRecentAddress)
    public Result getRecentAddress(@RequestBody RecentAddressRequest request);

    @PostMapping(PayHandleUrl.URL_PayHandle_orderDishesPay2)
    public Result orderDishesPay2(@RequestBody OrderDishesPayRequest request);

    /**
     * 付款码订单查询（qrCodeQuery）
     */
    @PostMapping(PayHandleUrl.URL_PayHandle_qrCodeQuery)
    public Result qrCodeQuery(@RequestBody QrCodeQueryRequest request);


    @PostMapping(value = PayHandleUrl.URL_getWxGhParam)
    public Result getWxGhParam(@RequestBody GetWxGhParamRequest request) ;

    @PostMapping(PayHandleUrl.URL_getOrderInfo)
    public Result getOrderInfo(@RequestParam("companyId") Long companyId, @RequestParam("tradeNo")String tradeNo,@RequestParam("machNo") String machNo);

}
